Skip to content

feat(tui): add auto_resize_timer config and refactor timer logic#105

Merged
alxhall merged 4 commits intoponbac:masterfrom
alxhall:feature/auto-resize-timer
Mar 6, 2026
Merged

feat(tui): add auto_resize_timer config and refactor timer logic#105
alxhall merged 4 commits intoponbac:masterfrom
alxhall:feature/auto-resize-timer

Conversation

@alxhall
Copy link
Collaborator

@alxhall alxhall commented Mar 6, 2026

This pull request introduces a new configuration option to control whether the timer widget in the Toki TUI application automatically resizes when starting or stopping. The change is fully integrated into the configuration system, environment variables, and application logic, and updates the documentation accordingly.

Configuration and documentation:

  • Added a new auto_resize_timer option to config.toml and the environment variable TOKI_TUI_AUTO_RESIZE_TIMER, with documentation in README.md. This option controls whether the timer widget automatically grows/shrinks when started/stopped. [1] [2]
  • Updated the TokiConfig struct and its defaults to include the auto_resize_timer boolean, defaulting to true. [1] [2] [3]
  • Added auto_resize_timer to the App struct and ensured it is set during initialization. [1] [2]

Timer logic updates:

  • Modified the timer start/stop methods in App to accept an auto_resize parameter, and updated all timer-related actions to use the new configuration value, ensuring consistent resizing behavior based on user preference. [1] [2] [3] [4] [5] [6]

alxhall added 4 commits March 6, 2026 13:08
- Move focused_this_week_index adjustment into stop_timer() so it is
  the single authoritative place to stop the timer
- Have SaveAndStop branch call app.stop_timer() instead of duplicating
  the logic inline
- Remove #[allow(dead_code)] — stop_timer() is now called at runtime
- Document auto_resize_timer in README (config key + env var)
@vercel
Copy link

vercel bot commented Mar 6, 2026

@alxhall is attempting to deploy a commit to the ponbac's projects Team on Vercel.

A member of the Team first needs to authorize it.

@alxhall alxhall changed the title Add auto_resize_timer config and refactor timer logic feat(tui): add auto_resize_timer config and refactor timer logic Mar 6, 2026
@alxhall alxhall merged commit 99aefaf into ponbac:master Mar 6, 2026
4 of 5 checks passed
@alxhall alxhall deleted the feature/auto-resize-timer branch March 6, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant